Skip to content

Feat/polyline arrows - #1

Merged
Inchill merged 12 commits into
mainfrom
feat/polyline-arrows
Oct 13, 2026
Merged

Inchill merged 12 commits into
mainfrom
feat/polyline-arrows

Conversation

@Inchill

@Inchill Inchill commented Oct 13, 2026

Copy link
Copy Markdown
Owner

What does this change?

Adds elbow and curved lines and arrows, and releases them as 1.1.0.

  • Elbow and curved lines. The style panel has a new Shape option for the line and arrow tools: straight, elbow, or curve.

    • Elbow: turns at right angles, like a flowchart connector.
    • Curve: follows your drag, then is simplified to a smooth curve.
    • Selected lines: switching the option also converts lines that are already drawn.
  • Data model. LinearShape gains optional via (points the line passes through) and curved. Lines without them are straight as before, so existing documents are unchanged. Older versions of the library show new elbow and curved lines as straight lines and don't break. New exports: the LineRoute type, and lineRoute in StyleState.

  • Release on version bump. release.yml now runs on pushes to main. When the version in package.json isn't on npm yet, it:

    • publishes to npm, with next as the dist-tag for pre-releases;
    • tags vX.Y.Z;
    • creates a GitHub release from the matching CHANGELOG.md section.

    Merges that keep the version publish nothing. CI fails if CHANGELOG.md has no section for the current version.

  • Formatting. Prettier and .editorconfig now enforce 2-space indentation. ESLint's formatting rules were removed in favour of Prettier. The reformat is a separate commit, listed in .git-blame-ignore-revs. The built bundle is identical apart from whitespace.

  • Website and docs.

    • The demo sketch shows a curved arrow and an elbow loop.
    • The README screenshots are refreshed.
    • Colour swatches are spaced so the selection ring no longer touches neighbouring swatches.
  • Version. Bumped to 1.1.0.

How was it tested?

  • pnpm lint && pnpm typecheck && pnpm test pass (66 tests, 14 new for lines; pnpm format:check passes too)
  • Tried it in the browser (pnpm dev): drew straight, elbow and curved arrows; switched the shape of selected lines; used dashed style; undo; light and dark mode. Touch not tested.
  • Screenshots or a GIF for UI changes (see docs/screenshot-*.png in this PR)

@Inchill
Inchill merged commit a5b873e into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant